{% extends "admin.base.html" %}
{% block adminbody %}
	<div id="topgirl">
		<div class="desc">
		<span>{{model.name}}</span>/
		{% for c in model.category %}
		<span>{{c}}</span>/
		{% endfor %}
		{% if model.address %}
		<span>{{model.address}}</span>/
		{% endif %}
		{% if model.visitcount %}
		<span>VISIT:{{model.visitcount}}</span>/
		{% endif %}
		{% if model.age %}
		<span>AGE:{{model.age}}</span>
		{% endif %}
		{% if is_admin %}
		<div class="profile">
		{% if model.birthdate %}
			<div><span class="key">出生日期</span><span class="value">{{model.birthdate}}</span></div>
		{% endif %}
		{% if model.astrology %}
			<div><span class="key">星座</span><span class="value">{{model.astrology}}</span></div>
		{% endif %}
		{% if model.hometown %}
			<div><span class="key">家乡</span><span class="value">{{model.hometown}}</span></div>
		{% endif %}
		{% if model.height %}
			<div><span class="key">身高</span><span class="value">{{model.height}}</span></div>
		{% endif %}
		{% if model.weight %}
			<div><span class="key">体重</span><span class="value">{{model.weight}}</span></div>
		{% endif %}
		{% if model.size %}
			<div><span class="key">三围</span><span class="value">{{model.size}}</span></div>
		{% endif %}
		{% if model.blood %}
			<div><span class="key">血型</span><span class="value">{{model.blood}}</span></div>
		{% endif %}
		{% if model.fair %}
			<div><span class="key">头发颜色</span><span class="value">{{model.fair}}</span></div>
		{% endif %}
		{% if model.feet %}
			<div><span class="key">鞋码</span><span class="value">{{model.feet}}</span></div>
		{% endif %}
		</div>
		<div class="mokolink">
			{% if model.excluded %}<span class="excluded">[EXCLUDED]</span>{% endif %}
			<a href="{{model.homepage}}">moko homepage</a>
			<a href="/admin/filter?target=model&key={{model.username}}">Filter</a>
		</div>
		<ul class="command">
		<li>Show <a href="{{request.path}}?target=iphone&with=1" class="button"><span>Albums (iPhone)</span></a> |
				 <a href="{{request.path}}?target=iphone&with=0" class="button"><span>Albums (non iPhone)</span></a>
			</li>
			<li><a href="#" class="button" onclick="javascript:selectalliphone();"><span>Select All: iPhone</span></a></li>
			<li><a href="#" class="button" onclick="javascript:clearalliphone();"><span>Clear All: iPhone</span></a></li>
		</ul>
		{% endif %}
	</div>
	{% if pages %}
	<div class="pager">
		<ul>
		{% for p in pages %}
		{% ifequal p page %}
		<li class="cpage">{{p}}</li>
		{% else %}
		<li><a href="{{request.path}}?page={{p}}{% if topgirl %}&topgirl=1{% endif %}">{{p}}</a></li>
		{% endifequal %}
		{% endfor %}
		</ul>
	</div>
	{% endif %}	
	{% if albums %}
	<div id="albumgallery">
	<form name="albumform" method="POST" action="{{request.path}}">
	<ul class="gallery">
	{% for album in albums %}
	<li class="album">
		<a href="/album/{{album.key}}" title="{{album.url}}">
			<img class="thumb" src="{{host_thumb}}/{{model.username}}/{{album.cover|imagename}}" alt="{{album.url}}">
		</a>
		<div class="name">{{album.title}}/{{album.get_photo_count}}{% if is_admin %}/{{album.count_photo}}{% endif %}{% if album.filtered %}/{{album.get_photos_iphone_count}}(filtered){% endif %}[<a href="/admin/filter?target=album&key={{album.key}}">Filter</a>]</div>
		<div class="form">
			<input type="hidden" name="album_{{album.key}}" value="1" />
			{% if not album.iphone %}
				<input type="checkbox" id="iphone_{{album.key}}" name="iphone_{{album.key}}"/>iPhone
			{% else %}
				<input type="checkbox" id="iphone_{{album.key}}" name="iphone_{{album.key}}" {% if not model.iphone %} disabled {% endif %}{% if album.iphone %} checked="true"{% endif %} />iPhone
				<input type="checkbox" id="selected_{{album.key}}" name="selected_{{album.key}}" {% if not model.iphone %} disabled {% endif %} {% if album.selected %} checked="true"{% endif %}/>Selected
			{% endif %}
		</div>
	</li>
	{% endfor %}
	</ul>
	<input type="hidden" name="target" value="{{target}}"/>
	<input type="hidden" name="with" value="{{operation}}"/>
	<input type="hidden" name="page" value="{{p}}"/>
	<input type="submit" value="Submit!" name="Submit"/>
	</form>
	</div>
	{% endif %}
	{% if pages %}
	<div class="pager">
		<ul>
		{% for p in pages %}
		{% ifequal p page %}
		<li class="cpage">{{p}}</li>
		{% else %}
		<li><a href="{{request.path}}?page={{p}}{% if topgirl %}&topgirl=1{% endif %}">{{p}}</a></li>
		{% endifequal %}
		{% endfor %}
		</ul>
	</div>
	{% endif %}	
{% endblock %}